home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14481 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: pukrs7.puk.ac.za!pukrs12!wskdpl
  2. From: wskdpl@pukrs12.puk.ac.za (Dirk Laurie)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Perl-like Regular Expression Library Without Perl
  5. Date: 15 Apr 1996 07:31:51 GMT
  6. Organization: University of Potchefstroom
  7. Message-ID: <4ksu17$1hcc@pukrs7.puk.ac.za>
  8. References: <316BB394.61FB@tsc.com>
  9. NNTP-Posting-Host: pukrs12.puk.ac.za
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Glenn Goldstein (ggoldstein@tsc.com) wrote:
  13. > I am looking for a regular expression library for C (commercial is OK)
  14. > that implements Perl regular expressions.  Calling Perl from C is not an
  15. > option; Perl will not be on the target platform <darn!>.
  16.  
  17. > I have built GNU's rx and regexp.  However, since I am porting a Perl
  18. > program to C, I would prefer not having to translate the regular
  19. > expressions from Perl's regexp to Emacs regexp (I am assuming that these
  20. > have some differences).
  21.  
  22. The GNU diff utility has its own regex.c (at least, the oldish one I've
  23. got).  This particular version allows a large number of options to be
  24. set at run-time, so that various different syntax versions can be
  25. accommodated.  Default is emacs, but you can select among others the
  26. following:
  27.  
  28.   Grouping with (...) instead of \(...\) -- a similar option is
  29.     available for several other operators
  30.   Support the braces construct to specify upper and lower limits on
  31.     the number of repetitions, e.g. A{2-5} means 2 to 5 A's
  32.   Choose whether the dot should match the null byte
  33.  
  34. And many more.
  35.  
  36. You may find it possible to define perl regexp syntax with all these
  37. choices available.
  38.  
  39. Dirk
  40.   
  41.